package com.fengye.security.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.GrantedAuthority;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author fengyexjtu@126.com
 * @date 2022年05月24日 10:12 AM
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "mooc_roles")
public class Role implements GrantedAuthority,Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(name="role_name", length = 50, unique = true)
    private String name;

    @Column(name="authority", length = 50, unique = true)
    private String authority;
}
